#include <algorithm>
#include <vector>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdlib>
#include <catch2/catch.hpp>
#include <utils.hpp>
#include <wasm_config.hpp>
#include <eosio/vm/backend.hpp>

using namespace eosio;
using namespace eosio::vm;
extern wasm_allocator wa;

BACKEND_TEST_CASE( "Testing wasm <f64_bitwise_0_wasm>", "[f64_bitwise_0_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "f64_bitwise.0.wasm");
   backend_t bkend( code );
   bkend.set_wasm_allocator( &wa );
   bkend.initialize(nullptr);

   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775808)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(0)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9223372036854775809)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(1)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9227875636482146304)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4503599627370496)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13826050856027422720)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4602678819172646912)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13830554455654793216)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4607182418800017408)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(13842132293034192152)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(4618760256179416344)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181119)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405311)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18442240474082181120)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9218868437227405312)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(18444492273895866368)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(18444492273895866368));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "copysign", bit_cast<double>(UINT64_C(9221120237041090560)), bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "abs", bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(9223372036854775808)))->to_f64()) == UINT64_C(0));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(0)))->to_f64()) == UINT64_C(9223372036854775808));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(9223372036854775809)))->to_f64()) == UINT64_C(1));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(1)))->to_f64()) == UINT64_C(9223372036854775809));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(9227875636482146304)))->to_f64()) == UINT64_C(4503599627370496));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(4503599627370496)))->to_f64()) == UINT64_C(9227875636482146304));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(13826050856027422720)))->to_f64()) == UINT64_C(4602678819172646912));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(4602678819172646912)))->to_f64()) == UINT64_C(13826050856027422720));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(13830554455654793216)))->to_f64()) == UINT64_C(4607182418800017408));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(4607182418800017408)))->to_f64()) == UINT64_C(13830554455654793216));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(13842132293034192152)))->to_f64()) == UINT64_C(4618760256179416344));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(4618760256179416344)))->to_f64()) == UINT64_C(13842132293034192152));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(18442240474082181119)))->to_f64()) == UINT64_C(9218868437227405311));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(9218868437227405311)))->to_f64()) == UINT64_C(18442240474082181119));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(18442240474082181120)))->to_f64()) == UINT64_C(9218868437227405312));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(9218868437227405312)))->to_f64()) == UINT64_C(18442240474082181120));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(18444492273895866368)))->to_f64()) == UINT64_C(9221120237041090560));
   CHECK(bit_cast<uint64_t>(bkend.call_with_return(nullptr, "env", "neg", bit_cast<double>(UINT64_C(9221120237041090560)))->to_f64()) == UINT64_C(18444492273895866368));
}

BACKEND_TEST_CASE( "Testing wasm <f64_bitwise_1_wasm>", "[f64_bitwise_1_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "f64_bitwise.1.wasm");
   CHECK_THROWS_AS(backend_t(code), std::exception);
}

BACKEND_TEST_CASE( "Testing wasm <f64_bitwise_2_wasm>", "[f64_bitwise_2_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "f64_bitwise.2.wasm");
   CHECK_THROWS_AS(backend_t(code), std::exception);
}

BACKEND_TEST_CASE( "Testing wasm <f64_bitwise_3_wasm>", "[f64_bitwise_3_wasm_tests]" ) {
   using backend_t = backend<std::nullptr_t, TestType>;
   auto code = backend_t::read_wasm( std::string(wasm_directory) + "f64_bitwise.3.wasm");
   CHECK_THROWS_AS(backend_t(code), std::exception);
}

